A light-section method is a technique of capturing, by an image capturing apparatus, an image of a line of light applied to a measurement object using a laser or the like, and measuring the unevenness shape of the measurement object from the degree of bend of the line of light detected from the captured image. For example, Patent Literature 1 discloses a technique of capturing an image of laser light applied to a measurement object using a time delay integration (TDI) camera, and measuring the shape of the measurement object on the basis of the obtained striped image.
The light-section method will be described in detail. As illustrated in FIG. 7, first, a linear light irradiation apparatus 10 that applies linear light, such as line laser or slit light, irradiates a measurement object 5 with linear light. Then, an image capturing apparatus 20 captures an image of linear light applied to the measurement object 5, and outputs a captured image A to an image processing apparatus 50. For example, when a measurement surface 5a of the measurement object 5, which is an irradiation surface irradiated with linear light, is flat, straight linear light appears in the captured image A. However, when the measurement surface 5a has a depression, linear light 12 that includes a bent part 12b due to the depression in a straight part 12a appears in the captured image A, as illustrated in FIG. 7. Thus, the shape of the measurement surface 5a can be measured on the basis of the degree of bend of the linear light 12 included in the captured image A, which is acquired by capturing an image of the measurement surface 5a of the measurement object 5 irradiated with the linear light 12.
In measuring the shape of the measurement object 5 from the captured image A by such a technique, in order to accurately find the degree of bend of the linear light 12 in the shot image and maintain the precision of shape measurement, it is necessary to achieve focus so that the linear light 12 is shown thin and clear in the shot image A. This requires the focus of the image capturing apparatus 20 to be accurately adjusted to be set on the measurement surface 5a of the measurement object 5. For example, in the case of measuring the shape of a side surface or a top surface of the measurement object 5 moving on a conveyance line, the image capturing apparatus 20 needs to be accurately focused on the side surface or the top surface of the measurement object 5. However, the shape of the measurement object 5 is not constant because, for example, specifications of products differ in a production line; for example, in the case where the measurement object 5 is a rectangular parallelepiped, size, such as width and height, differs.
If the width and height of the measurement object 5 is found before shape measurement, the distance from the installation position of the image capturing apparatus 20 to the measurement surface 5a of the measurement object 5 is calculated, and focus of the image capturing apparatus 20 is adjusted in accordance with the distance; thus, a clear image can be acquired. For example, in the case of measuring the shape of a side surface of the measurement object 5, as illustrated in FIG. 8, assume that a control apparatus 60 is notified of the width of the measurement object 5 before the start of measurement, and a distance D from the image capturing apparatus 20 to the measurement surface 5a is known. In addition, a focus ring 24 of the image capturing apparatus 20 that adjusts the position of a focus lens 22 is configured to be rotatable by a drive device, such as a motor. Thus, the control apparatus 60 drives the motor in accordance with the distance D from the installation position of the image capturing apparatus 20 to the measurement surface 5a of the measurement object 5 to rotate the focus ring 24 of the focus lens 22, thereby focusing the image capturing apparatus 20 on the measurement surface 5a. Alternatively, if the depth of field of the image capturing apparatus 20 is sufficiently deep, a clear image can be obtained without adjustment of focus in some cases.